import requestr from "@/utils/request";
import qs from "qs"

// 购物首页商品内容接口
export function Shopping_page (data) {
    return requestr({
        url: '/goods/getGoodsByUserId',
        method: "post",
        data: qs.stringify(data)
    })
}

//购物车商品展示
export function Shopping_trolley(data) {
    return requestr({
        url: '/cart/selectcart',
        method: "post",
        data: qs.stringify(data)
    })
}
//购物车商品数量改变传
export function Shopping_car_num(params) {
    return requestr({
        url: '/create/upnum',
        method: "get",
        params: params
    })
}

//商品详情页
export function ShoppingMain(data) {
    return requestr({
        url: '/goodspage/goodspage',
        method: "post",
        data: qs.stringify(data)
    })
}


//新增订单信息
export function addOrder(params) {
    return requestr({
        url: '/create/order',
        method: "get",
        params: params
    })
}

// 新增购物车
export function addshop(data) {
    return requestr({
        url: '/shop/addCart',
        method: "post",
        data:qs.stringify(data)
    })
}